import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:wallet_utils/base_router_config.dart';
import 'package:wallet_utils/color.dart';
import 'package:wallet_utils/event_bus_utils.dart';
import 'package:wallet_utils/ht_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wallet_utils/msg_event_utils.dart';
import 'package:wallet_utils/report_widget/click_widget.dart';
import 'package:wallet_utils/text_style.dart';
import 'logic.dart';

class LoanRecordPage extends StatelessWidget {
  final logic = Get.put(LoanRecordLogic());
  final state = Get.find<LoanRecordLogic>().state;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ColorManager.colorF4F5F6,
      appBar: htCommonAppbar(context, title: ''),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Image.asset('images/user_loan_his.png',width: 293.w,height: 157.w,),
            Container(
              margin: EdgeInsets.only(top: 24.w,bottom: 30.w),
              child: Text('暂无贷款记录',style: TextStyleUtils.style999999(fontSize: 14.sp),),
            ),
            ClickWidget(
              onTap: () {
                EventBusUtils.getInstance()
                    .fire(MsgEventBusUtils(MsgEventBusUtils.shopStatus, value: 0));
                EventBusUtils.getInstance().fire(MsgEventBusUtils(MsgEventBusUtils.upHomeStatus,value: false));
                Get.until((route) => (route.settings.name == BaseRouterConfig.main));
              },
              child: Container(
                width: 115.w,
                height: 35.w,
                alignment: const Alignment(0, 0),
                decoration: BoxDecoration(
                  color: ColorManager.colorD93C3A,
                  //设置四周圆角 角度 这里的角度应该为 父Container height 的一半
                  borderRadius: BorderRadius.all(const Radius.circular(25.0)),
                ),
                child: Text(
                  '去借款',
                  style: TextStyleUtils.styleFFFFFF(fontSize: 14.sp, fontWeight: FontWeight.bold),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
